package com.rose.springbootgeneratefile.api.dom.java;

import java.util.List;
import java.util.Set;

/**
 * 编译单元
 */
public interface CompilationUnit {
    /**
     * 格式化文件
     * @return
     */
    String getFormattedContent();

    /**
     * 引入类型
     * @return
     */
    Set<FullyQualifiedJavaType> getImportedTypes();

    /**
     * 静态引入
     * @return
     */
    Set<String> getStaticImports();

    /**
     * 父类
     * @return
     */
    FullyQualifiedJavaType getSuperClass();

    /**
     * 是否为接口
     * @return
     */
    boolean isJavaInterface();

    /**
     * Checks if is java enumeration.
     *
     * @return true, if is java enumeration
     */
    boolean isJavaEnumeration();

    /**
     * Gets the super interface types.
     *
     * @return the super interface types
     */
    Set<FullyQualifiedJavaType> getSuperInterfaceTypes();

    /**
     * Gets the type.
     *
     * @return the type
     */
    FullyQualifiedJavaType getType();

    /**
     * Adds the imported type.
     *
     * @param importedType
     *            the imported type
     */
    void addImportedType(FullyQualifiedJavaType importedType);

    /**
     * Adds the imported types.
     *
     * @param importedTypes
     *            the imported types
     */
    void addImportedTypes(Set<FullyQualifiedJavaType> importedTypes);

    /**
     * Adds the static import.
     *
     * @param staticImport
     *            the static import
     */
    void addStaticImport(String staticImport);

    /**
     * Adds the static imports.
     *
     * @param staticImports
     *            the static imports
     */
    void addStaticImports(Set<String> staticImports);

    /**
     * Comments will be written at the top of the file as is, we do not append any start or end comment characters.
     *
     * Note that in the Eclipse plugin, file comments will not be merged.
     *
     * @param commentLine
     *            the comment line
     */
    void addFileCommentLine(String commentLine);

    /**
     * Gets the file comment lines.
     *
     * @return the file comment lines
     */
    List<String> getFileCommentLines();
}
